package net.wangds;

import net.wangds.log.helper.LogHelper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
//@EnableJpaRepositories(basePackages = {"net.wangds.**.db","com.mgcc.**.repository.db"})
public class MariaDbConfig implements InitializingBean {

    @Value("${spring.datasource.driver-class-name}")
    private String driverClassName;

    /*
    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DruidDataSource druidDataSource(){
        LogHelper.info("创建Druid连接池数据源");
        LogHelper.info("spring.datasource.driver-class-name:"+driverClassName);
        return new DruidDataSource();
    }
    */


    @Override
    public void afterPropertiesSet() throws Exception {
        LogHelper.info("MariaDbConfig模块加载");
    }
}
